package tttrung43.libs.android;

import java.math.BigInteger;
import java.security.MessageDigest;

public class Encrypt {
	public Encrypt() {
	}

	// MD5 Encryption
	public String md5(String strSecret) {
		try {
			MessageDigest md = MessageDigest.getInstance("MD5");
			md.update(strSecret.getBytes(), 0, strSecret.length());
			return new BigInteger(1, md.digest()).toString(16);
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}
}
